<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2018/12/23 0023
  Time: 10:44
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ page import="java.util.ArrayList"%>
<%@ page import="java.util.List"%>
<%
    request.setCharacterEncoding("utf-8");
%>
<html>
<head>
    <title>forEach循环标签</title>
</head>
<body>

<%
    List<String> list=new ArrayList<String>();
    list.add("企业最大的威胁就是自身的生存!");
    list.add("管理是生存的基石,技术是发展的动力!");
    list.add("员工的核心不是领导而是客户!");
    request.setAttribute("list",list);
%>
<c:forEach items="${requestScope.list}" var="index" varStatus="count1">
<c:out value="第${count1.count}个值为:${index}"></c:out> <br>
</c:forEach>
<c:forEach items="${requestScope.list}" var="index2" begin="1" varStatus="count2">
    <c:out value="第${count2.count}个值为:${index2}"></c:out> <br>
</c:forEach>

</body>
</html>
